﻿@model RiderShop.Mobile.Modle.CustomerModel
@{
    Layout = "../Shared/_MobileLayout.cshtml";
}
@section header
{
    <link rel="stylesheet" href="~/Themes/RongJi/Style/base/css/sign.css?v=1">
}
@section title
{
    用户登录
}
@section pagetitle
{
    用户登录
}
<div class="top"><img src="~/Themes/RongJi/Style/base/imgs/signin_top.jpg" alt=""></div>
<form action="~/Customer/Login" method="POST" id="loginForm">
    <div class="body">
        <input type="hidden" id="returnUrl" name="returnUrl" value="@Model.ReturnUrl" />
        <input type="text" class="form-control" id="userName" name="userName" maxlength="30" placeholder="请输入用户名、手机或邮箱" value="@Model.CurrentUser.UserName" onkeyup="surnam_keyup(this);">
        <input type="password" class="form-control" id="passWord" name="passWord" placeholder="请输入密码" maxlength="20" autocomplete="off">
        @*  <label><input name="savePassword" type="checkbox" value="">记住密码</label>*@
        @if (Model.Result != null && !Model.Result.Status)
        {
            <span class="err_msg">@Model.Result.ErrorMessage</span>
        }
        else
        {
            <span class="err_msg" id="msgError"></span>
        }
    </div>
    <div class="bottom">
        <img src="~/Themes/RongJi/Style/base/imgs/ss.jpg" alt="">
        <div class="btn-group btn-group-justified btn-wrapper" role="group" aria-label="...">
            <div class="btn-group" role="group">
                <input type="button" id="btnLogin" class="btn btn-green" value="登录">
            </div>
            <div class="btn-group" role="group">
                <a type="button" href="~/Customer/PhoneRegister?returnUrl=@System.Web.HttpUtility.UrlEncode(Model.ReturnUrl)" class="btn">注册</a>
            </div>
        </div>
        <div class="btn-group btn-group-justified btn-wrapper" role="group" aria-label="...">

            <div class="btn-group" role="group">
                <a href="GetPass" style="float:right;margin-top:8px;text-decoration:underline;">找回密码</a>
            </div>
        </div>
    </div>
</form>

@if (Request.UserAgent.Contains("MicroMessenger"))
{
    <div class="login-body">
        <h2 class="login-title">一键登录</h2>
        <div class="login-third">
            <a class="login-logo" href="~/Customer/WeixinLogin?returnUrl=@System.Web.HttpUtility.UrlEncode(Model.ReturnUrl)"><img src="~/Themes/RongJi/Style/base/imgs/weixin_icon.png"></a>
        </div>
    </div>
}
@section footer
{
    <script type="text/javascript">
        $("#btnLogin").click(function () {
            if ($("#userName").val() == "") {
                KevinShop.MessageBox.Alert("请输入用户名!");
                return false;
            } if ($("#passWord").val() == "") {
                KevinShop.MessageBox.Alert("请输入密码!");
                return false;
            }
            document.forms["loginForm"].submit();
        });
        //让toolbar选中
        var $homeImg = $("#homeImg");
        var $categoryImg = $("#categoryImg");
        var $myaccountImg = $("#myaccountImg");
        var $searchImg = $("#searchImg");

        $homeImg.attr("src", "/Themes/RongJi/Style/base/imgs/f10.png");
        $categoryImg.attr("src", "/Themes/RongJi/Style/base/imgs/f2.png");
        $myaccountImg.attr("src", "/Themes/RongJi/Style/base/imgs/f3_c.png");
        $searchImg.attr("src", "/Themes/RongJi/Style/base/imgs/f4.png");
    </script>
}